package com.jxc.model.po;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/***********************************************************************
 * Module:  Role.java
 * Author:  Administrator
 * Purpose: Defines the Class Role
 ***********************************************************************/

/**
 * 职务(角色)
 * 
 * @pdOid 516ab3ea-c279-446f-bf98-1ed15cfcb1f7
 */
@Entity
@Table(name = "QXGL_ROLE")
public class Role extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -718396429915144972L;
	/**
	 * 职务名称
	 * 
	 * @pdOid ea182271-0f2c-4dc4-9c57-8836cdd236ce
	 */
	private String name;
	/**
	 * 类型，1经销商 2代理商3店长4营业员
	 */
	private Integer type;
	/**
	 * 备注
	 * 
	 */
	private String remark;
	/**
	 * 是否删除
	 */
	private Boolean isDeleted;
	/**
	 * 角色资源权限
	 * 
	 */
	private List<RoleResource> roleResources = new ArrayList<RoleResource>();

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "NAME")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "TYPE")
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@OneToMany(mappedBy = "role", cascade = CascadeType.ALL)
	public List<RoleResource> getRoleResources() {
		return roleResources;
	}

	public void setRoleResources(List<RoleResource> roleResources) {
		this.roleResources = roleResources;
	}
	@Column(name = "ISDELETED")
	public Boolean getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(Boolean isDeleted) {
		this.isDeleted = isDeleted;
	}
}